<?php
defined('IN_PHPCMS') or exit('No permission resources.');

$db = '';
$db = pc_base::load_model('content_model');
$MODEL = getcache('model','commons');
$modelid = 3;
$catid = $_GET['catid'];
$page = $_GET['page'] ? $_GET['page'] : '1';
$tablename = $db->table_name = $db->db_tablepre.$MODEL[$modelid]['tablename'];
$data = $db->listinfo(array('catid'=>$catid, 'posids'=>1),'RAND()', $page, $pagesize = 10);
foreach ($data as $key => $value) {
	$data[$key]['cutname'] = str_cut($data[$key]['title'],72);
	$data[$key]['inputtime'] = date('y/m/d',$data[$key]['inputtime']);
}
echo json_encode($data, JSON_FORCE_OBJECT);

?>